package com.hnust.api;

import com.hnust.domain.*;
import com.hnust.store.dto.JudgePaperDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.POST;

@FeignClient(
        name = "ReviewPaperApi",
        url = "${feign.judgeUrl}"
//        url = "http://127.0.0.1:4523/m1/695559-0-default/"
)
@Component
public interface ReviewPaperApi {
    @GetMapping(value = "/judge/done")
    Result<JudgeAnswerPartDto> getAllQuestionMessage
            (@RequestParam("testid") String testId,
             @RequestParam("paperid") String paperId,
             @RequestParam("studentid") String studentId);


    @GetMapping(value = "/judge/stu")
    Result<StudentAnswerPartDto> getStudentAnswerPartDto(
            @RequestParam("testid") String testId,
            @RequestParam("paperid") String paperId,
            @RequestParam("studentid") String studentId);

    @GetMapping(value = "/judge/find")
    Result<PaperAnswerPartDto> getPaperAnswerPartDto(
            @RequestParam("paperid") String paperId);
}
